package com.qiall.project.data.mapper;

import com.qiall.project.data.entity.ProjectInfo;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 吴金辉
 */
@Mapper
public interface ProjectInfoMapper {
    /**
     * @param projectInfo
     */
    void insert(ProjectInfo projectInfo);

    /**
     * @param projectInfo
     */
    void update(ProjectInfo projectInfo);

    /**
     * @param id
     * @return
     */
    ProjectInfo select(@Param("id") Integer id);

    ProjectInfo selectByName(@Param("projectName") String name);

    int count(@Param("info") ProjectInfo info, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<ProjectInfo> selectByPage(@Param("info") ProjectInfo info, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("limit") Integer limit, @Param("offset") Integer offset);

    List<ProjectInfo> selectByOrgId(@Param("orgId") Integer orgId);

}
